package mvp.cklm.testtask.dao;

import com.mongodb.DBObject;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: WORKSPOT2
 * Date: 24.02.14
 * Time: 21:33
 */
public interface IAbstractDao<K, T> {
    boolean saveObject(T model);

    T getObjectById(K key);

    long getObjectCount();

    List<T> getPage(DBObject req, int page, int countOnPage);

    List<T> getPage(int page, int countOnPage);

    K getMaxId();

    List<T> findByQuery(DBObject query);

    void dropCollection();
}
